package com.gxa.worker.recycling.service.impl;

import com.gxa.core.recycling.pojo.CommunityManage;
import com.gxa.worker.recycling.mapper.CommunityManageMapper;
import com.gxa.worker.recycling.service.CommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author ：looker
 * @date ：Created in 2021/12/8 12:29
 */
@Service
public class CommunityServiceImpl implements CommunityService {
    @Autowired
    CommunityManageMapper communityManageMapper;


    @Override
    public List<CommunityManage> getLikePosition(String position) {
        Example example = new Example(CommunityManage.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andLike("provinces","%"+position+"%");
        List<CommunityManage> select = communityManageMapper.selectByExample(example);

        return select;
    }
}
